import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvSource;
import org.junit.jupiter.params.provider.ValueSource;

/**
 * @version : V1.0
 * @program: maven
 * @ClassName: T2
 * @Description:
 * @Author: chenxiejia
 * @Date: 2022/2/8 19:25
 */
@Slf4j
public class T2 {
    @ParameterizedTest
    @CsvSource("js,fj")
    void show(String s, String ss) {
        System.out.println(s);
        System.out.println(ss);
    }

    @ParameterizedTest
    @ValueSource(strings = "java")
    void show1(String s) {
        System.out.println(s);
    }

    @Test
    void show2() {
        //assertEquals（预期的，实际的） 预期不等于实际时失败
        //Assertions.assertEquals(2, 2);
        //assertTrue（表达式） 如果表达式不正确则失败
        //Assertions.assertTrue(4 < 3);
        //判断是否不为空
        String s = "";
//        Assertions.assertNotNull(s);
        Assertions.assertAll(() -> Assertions.assertEquals(2, 2), () -> Assertions.assertNotNull(s));
    }
}
